<div id="tablecontent">
<form method="post" action="/admin/picture/savelist" >
	<input type="submit" name="submitBtn" id="submitBtn" class="submit" value="更新图片描述">
	<input name="booklet_id" type="hidden" class="num" value="<?php echo $booklet->id; ?>" />
  <table class="testgrid" id="tableid">
    <thead>
      <tr>
        <th>设置封面</th>
        <th>id</th>
        <th>booklet_id</th>
        <th>描述</th>
        <th>图片</th>
      </tr>
    </thead>
    <tbody>
<?php
	foreach($picture_list as $picture)
	{
?>
      <tr id="DemoGrid">
		<td>
		<input type="radio" name="frontcover" value='<?php echo $picture->id; ?>'<?php if ($booklet->frontcover == $picture->id) { echo 'checked'; } ?>/>
		</td>
		<td>
		<input name="<?php echo $picture->id; ?>[id]" type="text" class="num" value="<?php echo $picture->id; ?>" readonly="readonly" />
		</td>
	  	<td><?php echo $picture->booklet_id; ?></td>
		<td>
		<textarea id="description" name="<?php echo $picture->id; ?>[description]" class="inputs med long required" rows="10" ><?php echo $picture->description; ?></textarea>
		</td>
		<td>
			<a href="/book/picture/image?picture_id=<?php echo $picture->id; ?>" target="_blank">
			<img src="/book/picture/thumbnail?picture_id=<?php echo $picture->id; ?>"></a>
		<td>
			<a href="/admin/picture/delete/<?php echo $picture->id; ?>" onclick="var bl=confirm('真要删除?'); if(bl){return true;} else {return false;}" class="rates_button">删除</a>
		</td>
      </tr>
<?php
	}
?>
    </tbody>
  </table>

</form>
</div>

